<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <title>Document</title>
     <link rel="stylesheet" href="../../css/webuploader.css" />
     <style>
        html,body{
            width: 100%;
            height: 100%;
        }
        body{
            margin: 0;
            padding: 0;
        }
        h1{
            text-align: center;
        }
        code{
            padding: 2px 4px;
            font-size: 90%;
            color: #c7254e;
            background-color: #f9f2f4;
            border-radius: 4px;
            margin: 0 5px;
        }
        
        .container{
            width: 1200px;
            margin: 20px auto;
        }
        .preview-list{
            min-height: 180px;
            padding: 20px;
            border: 1px dashed #bbb;
            margin-bottom: 20px;
        }
        .choose-file{
            width: 160px;
            height: 60px;
            margin-bottom: 10px;
        }
        .choose-file .webuploader-pick{
            line-height: 60px;
        }
     </style>
</head>
<body>
    <div class="container">
        <h1>排除<code>.html、.js、.css、application/gzip(zip压缩文件)、psd</code>等文件</h1>
        <div class="preview-list" id="preview_list1"></div>
        <div class="choose-file" id="choose_file1"></div>
        <button class="upload-btn" id="upload_btn1">开始上传</button>
    </div>
   
    


    <script src="../../jquery-1.11.3.min.js"></script>
    <script src="../../webuploader.js"></script>
    <script src="../../UploadPreview.js"></script>
    <a href="../../Uploader.swf" id="uloader_swf"></a>
    <script>
        new UploadPreview({
            url: "upload.php",
            swf: document.getElementById("uloader_swf").href,
            previewInfo: {
                previewWrap: "#preview_list1"
            },
            btns: {
                chooseBtn: "#choose_file1",
                chooseBtnText: "选择文件",
                uploadBtn: document.getElementById("upload_btn1")
            },
            pictureOnly: false,
            ignore: {
                extensions: ".html,.js,.css,psd",
                mimeTypes: "application/gzip"
            },
            uploadError: function (file,reason){
                console.log('上传失败代码：' + reason);
            },
            uploadSuccess: function (file,response){
                consoel.log(response);
            },
            error: function (errorInfo){
                alert(errorInfo.msg);
            }
        });

    </script>
</body>
</html>